package com.future.mapper;

import com.future.pojo.Album;
import com.future.pojo.Discuss;
import com.future.pojo.Musics;
import com.future.pojo.Users;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Mapper

public interface AdminMapper {
    //查询所有用户
    List<Users> queryAllUsers(@RequestParam("begin")int begin, @RequestParam("end")int end);

    //查询用户记录条数
    int userCount();

    //查询所有管理员
    List<Users> queryAdmin();

    //查询所有歌手
    List<Users> querySinger(@RequestParam("begin")int begin,@RequestParam("end")int end);

    //删除一个用户
    int deleteUser(@RequestParam("userId")Integer userId);

    //模糊查询一个用户（用户名）
    List<Users> queryUserByusername(@RequestParam("userName")String userName);

    //模糊查询一个歌手（用户名）
    List<Users> querySingerByusername(@RequestParam("userName")String userName);

    //模糊查询一首歌
    List<Musics> querySongBymcName(@RequestParam("mcName")String mcName);
    //根据id查找用户
    Users queryByIdUser(int userId);

    //管理员更新用户信息
    int updateUser(@RequestParam("userId")Integer userId,@RequestParam("userName") String userName,@RequestParam("userEmail") String userEmail, @RequestParam("userLv")String userLv, @RequestParam("userVipBal")Integer userVipBal,@RequestParam("userGen")String userGen);

    //添加用户
    int adduser(@RequestParam("userName")String userName,@RequestParam("userHao")String userHao,@RequestParam("userPwd")String userPwd,@RequestParam("userEmail")String userEmail,@RequestParam("userGen")String userGen);
    //增加歌手
    int addSinger(@RequestParam("userName")String userName,@RequestParam("userGen")String userGen,@RequestParam("userHao")String userHao,@RequestParam("userPwd")String userPwd,@RequestParam("userEmail")String userEmail,@RequestParam("userBirth")String userBirth,@RequestParam("userHot")String userHot,@RequestParam("userImgload")String userImgload,@RequestParam("userThing")String userThing,@RequestParam("userLv")String userLv);
    //删除音乐
    int deleteSong(@RequestParam("mcId")Integer mcId);
    //增加歌曲
    int addSong(@RequestParam("mcName")String mcName,@RequestParam("mcHot")int mcHot,@RequestParam("mcLv")int mcLv, @RequestParam("mcMvLoad")String mcMvLoad,@RequestParam("mcLoad")String mcLoad,@RequestParam("mcTime")String mcTime,@RequestParam("albName")String albName,@RequestParam("userName")String userName,@RequestParam("mcLrc")String mcLrc,@RequestParam("albId")int ablId,@RequestParam("mcLoaddele")String mcLoaddele);
   //修改音乐信息
   int updateSong(@RequestParam("mcId")Integer mcId,@RequestParam("mcName")String mcName,@RequestParam("mcHot")int mcHot,@RequestParam("mcLv")int mcLv,@RequestParam("albName")String albName,@RequestParam("userName")String userName,@RequestParam("mcLrc")String mcLrc,@RequestParam("albId")int albId);


    //歌手条数
    int singerCount();

    //音乐条数
    int musicCount();

    //查询所有音乐
    List<Musics> queryAllMusic(@RequestParam("begin")int begin,@RequestParam("end")int end);
    //检查歌曲是否存在
    int checkSong(@RequestParam("mcName")String mcName,@RequestParam("userName")String userName);

    //修改音乐信息
    int updateSinger(Integer userId,String userName, String userGen, String userPwd,String userBirth, String userHot, String userImgload,String userThing);

    //查询所有专辑
    List<Album> queryAllAlbum(@RequestParam("begin")int begin, @RequestParam("end")int end);

    int deleteAlbum(@RequestParam("albId")int albId);
    int deletesong(@RequestParam("albId")int albId);

    int BatchdeleteUsers(List<String> numbers);


    //查询评论
    List<Discuss> queryDis();

    //同意成为歌手
    int changeSingerTrue(@RequestParam("userId") int userId, @RequestParam("userLv") String userLv);

    //不同意成为歌手
    int changeSingerFalse(@RequestParam("userId") int userId, @RequestParam("userLv") String userLv);

    //专辑数量
    int albumCount();

    List<Album> queryalbumByusername(@RequestParam("albName")String albName);

    int checkAlbum(@RequestParam("albName")String albName);
    int addAlbum(@RequestParam("albName")String albName,@RequestParam("albThing")String albThing,@RequestParam("userId")int userId,@RequestParam("albHot")int albHot,@RequestParam("albImgload")String albImgload,@RequestParam("albTime")String albTime,@RequestParam("albLanguage")String albLanguage,@RequestParam("albType")String albType);
    int updateAlbum(@RequestParam("albName")String albName,@RequestParam("albThing")String albThing,@RequestParam("albHot")int albHot,@RequestParam("albImgload")String albImgload,@RequestParam("albTime")String albTime,@RequestParam("albLanguage")String albLanguage,@RequestParam("albId")int albId,@RequestParam("albType")String albType);
    int deleteDis(@RequestParam("disId")int disId);

    int BatchdeleteSongs(List<String> names);

    int BatchdeleteAlbum(List<String> numbers);
}
